<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			var flag = true;
			var arr = new Array(100);
			var count = 0;
			var login = prompt("1.登录2.退出");
			if (login == 1) {
				do {
					var userName = prompt("请输入用户名");
					var password = prompt("请输入密码");
					if (userName == "zhangsan" && password == "123") {
						break;
					}
				} while (true);

				do {
					var choice = prompt("1.添加学生2.删除学生3.修改学生4.遍历学生5.退出");
					switch (choice) {
						case "1":
							var stuId = prompt("请输入学号");
							var stuName = prompt("请输入姓名");
							var stuAge = prompt("请输入年龄");
							var stu = new Array(3);
							stu[0] = stuId;
							stu[1] = stuName;
							stu[2] = stuAge;
							arr[count] = stu;
							count++;
							console.log(arr);
							break;
						case "2":
							break;
						case "3":
							break;
						case "4":
							for (var i = 0; i < count; i++) {
								for (var j = 0; j < arr[i].length; j++) {
									console.log(arr[i][j]);
								}
							}
							break;
						case "5":
							flag = false;
							break;
					}
				} while (flag);
			}
			alert("谢谢!!!")
		</script>
	</head>
	<body>
	</body>
</html>
